package cn.getech.data.development.constant;

import lombok.Getter;

/**
 * 任务类型的枚举
 *
 * @author zenith
 */
@Getter
public enum PackVersionType {


    CONNECT(0, "connect"),
    TABLE(1, "table"),
    UDF(2, "udf"),
    WORKFLOW(3, "workflow"),
    WORKLOWLAY(4, "workflowlay");

    int code;
    String name;

    PackVersionType(int code, String message) {
        this.code = code;
        this.name = message;
    }

    public static PackVersionType ObjOf(Integer code) {
        if (code == null) {
            return null;
        } else {
            for (PackVersionType s : PackVersionType.values()) {
                if (s.getCode() == code) {
                    return s;
                }
            }
            return null;
        }
    }
}
